home *** CD-ROM | disk | FTP | other *** search
/ Secrets of Stargate / STARGATE.iso / mac / STARGATE (5MB Macintosh) / STARGATE (5MB Macintosh).DXR / 00008_Link Scripts.ls < prev    next >
Encoding:
Text File  |  1994-10-19  |  4.5 KB  |  189 lines

  1. on mapClick sN
  2.   global gLinkBackMap
  3.   spinCursor()
  4.   set c to sN - 4
  5.   set hOn to the castNum of sprite sN
  6.   set the castNum of sprite sN to cast value(hOn)
  7.   updateStage()
  8.   wait(20)
  9.   set the castNum of sprite sN to cast value(hOn + 1)
  10.   updateStage()
  11.   set gLinkBackMap to EMPTY
  12.   if c = 1 then
  13.     openIV()
  14.   else
  15.     if c = 2 then
  16.       LinkTo("People Cover")
  17.     else
  18.       if c = 3 then
  19.         LinkTo("SB Cover")
  20.       else
  21.         if c = 4 then
  22.           LinkTo("Stage Cover")
  23.         else
  24.           if c = 5 then
  25.             LinkTo("PS Cover")
  26.           else
  27.             if c = 6 then
  28.               LinkTo("AW Cover")
  29.             else
  30.               if c = 7 then
  31.                 LinkTo("CD Credits")
  32.               else
  33.                 if c = 8 then
  34.                 end if
  35.               end if
  36.             end if
  37.           end if
  38.         end if
  39.       end if
  40.     end if
  41.   end if
  42.   startMouse()
  43. end
  44.  
  45. on linkToPrefs
  46.   global gLinkBackMap
  47.   spinCursor()
  48.   if gLinkBackMap = EMPTY then
  49.     set gLinkBackMap to "LinkTo " & QUOTE & the frameLabel & QUOTE
  50.   end if
  51.   LinkTo("Preferences")
  52. end
  53.  
  54. on LinkToMap
  55.   global gLinkBackMap
  56.   spinCursor()
  57.   if gLinkBackMap = EMPTY then
  58.     set gLinkBackMap to "LinkTo " & QUOTE & the frameLabel & QUOTE
  59.   end if
  60.   LinkTo("Map")
  61. end
  62.  
  63. on LinkBackPref
  64.   LinkBackMap()
  65. end
  66.  
  67. on LinkBackMap
  68.   global gLinkBackMap, gSBState, gPSState, gPeopleState
  69.   spinCursor()
  70.   hidePuppets()
  71.   updateStage()
  72.   tell the stage
  73.     set cmd to gLinkBackMap
  74.     set gLinkBackMap to EMPTY
  75.     spinCursor()
  76.     puppetPalette(the framePalette)
  77.     dissolveEffect()
  78.     go("Black")
  79.     puppetPalette(0)
  80.     dissolveEffect()
  81.     do(cmd)
  82.   end tell
  83.   spinCursor()
  84.   set fName to the frameLabel
  85.   set fNum to the frame
  86.   set peopleStart to marker("Producer BG0") - 1
  87.   set peopleEnd to marker("Production Team BG1") + 1
  88.   if fName = "SB BG" then
  89.     updateSB(value(item 1 of gSBState))
  90.   else
  91.     if fName = "PS BG" then
  92.       spinCursor()
  93.       updatePS(value(item 1 of gPSState))
  94.     else
  95.       if (fNum > peopleStart) and (fNum < peopleEnd) then
  96.         LinkPeopleFromIcon(value(line 2 of gPeopleState))
  97.       end if
  98.     end if
  99.   end if
  100.   resetCursor()
  101. end
  102.  
  103. on LinkBack
  104.   global gLinkBack, gOnPC, gLastPalette
  105.   stopAiff()
  106.   spinCursor()
  107.   hidePuppets()
  108.   tell the stage
  109.     set cmd to gLinkBack
  110.     set gLinkBack to EMPTY
  111.     if gLastPalette = EMPTY then
  112.       set gLastPalette to the framePalette
  113.     end if
  114.     puppetPalette(gLastPalette)
  115.     set gLastPalette to EMPTY
  116.     spinCursor()
  117.     go("Black")
  118.     spinCursor()
  119.     puppetPalette(0)
  120.     pause()
  121.     updatePalette()
  122.     spinCursor()
  123.     put cmd
  124.     do(cmd)
  125.     continue()
  126.   end tell
  127. end
  128.  
  129. on updateLinkIcons linkBackMsg, fromPrefix, theStills, theMovie, theSB, thePeople
  130.   global gLinkBack, gLinkStills, gLinkMov, gLinkSB, gLinkPeople, gMovUserViewed, gPSUserViewed
  131.   set gLinkBack to linkBackMsg
  132.   set gLinkStills to theStills
  133.   set gLinkMov to theMovie
  134.   set gLinkSB to theSB
  135.   set gLinkPeople to thePeople
  136.   set sN to 39
  137.   if theStills <> 0 then
  138.     set hasStuff to theStills <> EMPTY
  139.     set oldFlag to getOne(value(gPSUserViewed), value(theStills)) > 0
  140.     set the puppet of sprite sN to 1
  141.     if hasStuff then
  142.       if not oldFlag then
  143.         set the castNum of sprite sN to cast (fromPrefix & "PSOG.PIC")
  144.       else
  145.         set the castNum of sprite sN to cast (fromPrefix & "PSCG.PIC")
  146.       end if
  147.     end if
  148.   end if
  149.   set the visible of sprite sN to not ((theStills = 0) or (hasStuff = 0))
  150.   set sN to 38
  151.   if theMovie <> 0 then
  152.     set hasStuff to theMovie <> EMPTY
  153.     set oldFlag to getOne(gMovUserViewed, theMovie) > 0
  154.     set the puppet of sprite sN to 1
  155.     if hasStuff then
  156.       if not oldFlag then
  157.         set the castNum of sprite sN to cast (fromPrefix & "MOVOG.PIC")
  158.       else
  159.         set the castNum of sprite sN to cast (fromPrefix & "MOVCG.PIC")
  160.       end if
  161.     end if
  162.   end if
  163.   set the visible of sprite sN to not ((theMovie = 0) or (hasStuff = 0))
  164. end
  165.  
  166. on showLinkedStill
  167.   global gLinkStills, gPSRecords, gPSViewedHere, gSBState
  168.   if (gLinkStills = EMPTY) or voidp(gLinkStills) then
  169.     beep()
  170.   else
  171.     set gPSRecords to value("[" & gLinkStills & "]")
  172.     set gPSViewedHere to 1 && count(gPSRecords)
  173.     set the visible of sprite 31 to 0
  174.     showProdStills("Links", "Storyboard: Scene " & the text of field "SB_Scene" && " - Shot:" && the text of field "SB_Shot")
  175.   end if
  176. end
  177.  
  178. on showLinkedMov
  179.   global gLinkMov, gSBState
  180.   if (gLinkMov = EMPTY) or voidp(gLinkMov) then
  181.     beep()
  182.   else
  183.     set theLine to LineOffset(gLinkMov, field "MOVTXT_F")
  184.     if theLine > 0 then
  185.       showQT(theLine)
  186.     end if
  187.   end if
  188. end
  189.